<?php require_once 'Master_controller.php';
class Home extends Master_controller {
	function __construct() {
		parent::__construct();
		$this->view_data['active_home'] = "current";
		$this->view_data['view'] = "home_view";
	}
	
	function index() {
		$this->load->model('Content_model');
		$this->load->model('News_model');
		$this->load->model('Product_model');
		
		$this->view_data['intro_text'] = $this->Content_model->get_by_name(INTRO_NAME)->row()->content;
		$this->view_data['lastest_news'] = $this->News_model->get_paged_list(5, 0)->result();
		$this->view_data['hot_product'] = $this->Product_model->get_paged_list(6, 0)->result();
		
		$this->render_page($this->view_data);
	}
}